lg = MYBAR(barval,evalue,conditions,colors,ax,lg,enames,type) ARGUMENTS barval ... 1 x c vector of barvalues eval ... 1 x c vector of errorvalues conditions ... 1 x c cell aray of names for each bar colors ... 1 x c cell array of colors for each bar ax ... handle of axis lg ... create legend 0: no, 1: yes RETURNS lg ... Legend handle NOTES: - this is an ensembler standalone function. It may not work well outside of the ensembler needs